from machine import Pin


DO1 = Pin(15, Pin.OUT)
DO2 = Pin(16, Pin.OUT)


def relay_ctl(port,state):
    if port==1:
        DO1.value(state)
        print('relay_ctl_1',state)
    elif port==2:
        DO2.value(state) 
        print('relay_ctl_2',state)
    elif port==3:
        DO1.value(state)
        DO2.value(state) 
        print('relay_ctl_1_2',state)



